<div class="body-panel" style="min-height: 680px" ng-controller="ListDishController">
    <div style="width: 95%; margin: auto;">
        <h2>
            Dish List
            <small>You can update your dish list here.</small>
        </h2>
        <a class="btn btn-primary pull-right"
           style="position: relative; right: 20px; bottom: 20px;"
           href="#/addDish" ng-hide="merchant.status == 0">Add Dish</a>
    </div>
    <br/>

    <div
            style="position: relative; width: 95%; border: 1px solid #ddd; margin: auto;">
        <table class="table table-striped text-center table-hover">
            <thead>
            <tr>
                <td>Image</td>
                <td>Name</td>
                <td>Price</td>
                <td></td>
                <td></td>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="dish in dishes">
                <td width="20%"><img style="width: 150px;height: 120px" ng-src="{{constant.imgServer}}{{dish.img}}">
                </td>
                <td width="16%" style="vertical-align: middle" ng-bind="dish.dname"></td>
                <td width="16%" style="vertical-align: middle" ng-bind="dish.price">¥</td>

                <td width="16%" style="vertical-align: middle">
                    <button
                            class="btn btn-info" data-toggle="modal"
                            data-target="#groomModel" ng-disabled="{true : false, false: true}[dish.status != 2]"
                            ng-click="isGroom($index)">Groom
                    </button>
                </td>
                <td width="16%" style="vertical-align: middle"><a
                        class="btn btn-danger" data-toggle="modal"
                        data-target="#model" ng-click="isDelete($index)">Delete</a></td>
            </tr>

            </tbody>
        </table>
    </div>
    <div ng-include="'/dish/views/deleteWarning_modal.html'"></div>
    <div ng-include="'/dish/views/groomWarning_modal.html'"></div>
</div>